class Animal:
    def __init__(self,name):
        self.name = name

    def eat(self):
        print(f"--------{self.name}吃------")
    def run(self):
        print(f"--------{self.name}跑--------")
    def sleep(self):
        print(f"--------{self.name}睡--------")

# class 子类类型（父类类型）
class Dog(Animal):
    def __init__(self,name,zhong):
        super().__init__(name) # super()代表父类对象
        self.zhong = zhong


    def bark(self):
        super().eat()
        print(f"------{self.name}叫-忠诚度{self.zhong}------")

class Cat(Animal):
    def catch(self):
        print(f"-------{self.name}抓老鼠------")

class Xiaotian(Dog) :
    def fly(self):
        print(f"--------{self.name}飞--------")

# a = Animal("动物")
# a.run()

bai = Dog("狗",89)
bai.bark()

# xiao = Xiaotian("啸天",90)
# xiao.fly()